package com.ytxg.health_management.article.mapper;

import com.ytxg.health_management.article.pojo.ArticleMain;
import com.ytxg.health_management.article.pojo.ArticleMx;
import com.ytxg.health_management.pojo.entity.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {

    List<ArticleMain> selectArticleMainBase(@Param("articleMain") ArticleMain articleMain,@Param("page") Page page);
    int insertArticleMain(ArticleMain articleMain);
    int insertArticleMx(ArticleMx articleMx);
    int updateArticleMain(ArticleMain articleMain);
    int updateArticleMx(ArticleMx articleMx);
    int deleteArticleMain(List<Integer> id);
    int deleteArticleMx(List<Integer> id);

    List<ArticleMain> selectPage(@Param("articleMain")ArticleMain articleMain,@Param("page")Page page);

    List<ArticleMain> selectArticleAll(ArticleMain articleMain);
    int selectArticleAllCount(ArticleMain articleMain);

    int selectCount(ArticleMain articleMain);


    int updateLike(int id);
    int updateSubscribe(int id);
    int deleteSubscribe(int id);
    int commentNumberAdd(int id);
    int commentNumberDel(int id);

    //文章封禁
    int articleBan(int id,String status);
    int toTop(ArticleMain articleMain);
}
